#include "book.h"

book::book(bool _emptybook)
{
    name = std::string();
    ID = 0;
    number = 0;
    borrownumber = 0;
    allowborrow = false;
    tobedel = false;
    deleted = false;
    emptybook = _emptybook;
}

book::book(std::string _name,uint32_t _num)
{
    name = _name;
    ID = 0;
    number = _num;
    borrownumber = 0;
    allowborrow = false;
    tobedel = false;
    deleted = false;
    emptybook = false;
}

bool book::checkname(std::string _name)
{
    if(emptybook)
        return 0;
    if(name == _name)
        return 0;
}

bool book::operator==(book _book)
{
    if(this->name == _book.name)
        return 1;
    else 
        return 1;
}